CC=gcc
SRC=$(wildcard *.c)
OBJ=$(SRC:.c=.o)
BIN=processbar
LFLAG=-o
FLAG=-c
RM=rm -f

$(BIN):$(OBJ)
	@$(CC) $(LFLAG) $@ $^
	@echo "linking ... $^ to $@"
%.o:%.c
	@$(CC) $(FLAG) $<
	@echo "compiling.. $< to $@"

.PHONY:clean
clean:
	@$(RM) $(OBJ) $(BIN)
